home *** CD-ROM | disk | FTP | other *** search
Text File | 2003-02-21 | 43.9 KB | 1,182 lines |
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsServerHash.inc"-->
- <!--#include file="include/wmsPlugins.inc"-->
- <!--#include file="include/wmsHeader.inc"-->
- <!--#include file="include/wmsPageBanner.inc"-->
- <!--#include file="include/wmsError.inc"-->
- <!--#include file="plugin_loading.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: LoggingAdmin.asp
- '
- ' Contents:
- '
- '--------------------------------------------------------------------------
-
- ConnectToPlugin
- ConnectToPluginAdmin
-
- BeginErrorHandling
-
- on error resume next
-
- 'WMS_LOG_CYCLE_TYPE
- Const WMS_LOG_CYCLE_NONE = 0
- Const WMS_LOG_CYCLE_SIZE = 1
- Const WMS_LOG_CYCLE_MONTH = 2
- Const WMS_LOG_CYCLE_WEEK = 3
- Const WMS_LOG_CYCLE_DAY = 4
- Const WMS_LOG_CYCLE_HOUR = 5
-
- 'WMS_LOG_EVENT_TYPE
- Const WMS_LOG_EVENT_NONE = 0
- Const WMS_LOG_EVENT_PLAYER = 1
- Const WMS_LOG_EVENT_DISTRIBUTION = 2
- Const WMS_LOG_EVENT_LOCAL = 4
- Const WMS_LOG_EVENT_REMOTE = 8
- Const WMS_LOG_EVENT_FILTER_ON_ROLE = 16
-
- Dim i
- Dim dwVerifyPathComparison
- dwVerifyPathComparison = 1
- Dim dwLoggedEvents
- Dim dwNewLoggedEvents
- Dim bRequestClientLogs
- Dim bRequestRemClientLogs
- Dim bSavePlayerLog
- Dim bSaveDistLog
- Dim bUseRole
- Dim bCycleTheLogFile
- Dim strTemplate
- Dim strExpandedTemplate
-
- dwTabIndex = 1
-
- dwLoggedEvents = 0
- bRequestClientLogs = FALSE
- bRequestRemClientLogs = FALSE
- bSavePlayerLog = FALSE
- bSaveDistLog = FALSE
- bUseRole = FALSE
- bCycleTheLogFile = FALSE
-
- Dim strOp
- strOp = RemoveDangerousCharacters( GetFormStr( "formHistory" ) )
-
- on error resume next
-
- Dim strRole
- if 0 < Len( GetFormStr( "role") ) then
- strRole = Server.HTMLEncode( GetFormStr( "role" ) )
- else
- strRole = Server.HTMLEncode( g_objPluginAdmin.RoleFilter )
- end if
-
- if ( 0 < Len( GetFormStr( "cycle" ) ) ) then
-
- g_objPluginAdmin.CycleNow
-
- elseif( 0 < Len( GetFormStr( "ok" ) ) ) then
-
- Err.Clear
- Session( "ErrorNumber" ) = 0
- Session( "ErrorDescription" ) = ""
-
- ' use a do-while-false structure to break out upon first error
- do
- strTemplate = RemoveSpecifiedChars( Left( GetFormStr("LogFileTemplate"), MAX_PATH ), REGEXP_ILLEGAL_TEMPL_CHARS )
- ClearError
- if( 0 <> StrComp( strTemplate, g_objPluginAdmin.Template, vbTextCompare ) ) then
- err.Clear
-
- Dim bIsValidTemplate
- strExpandedTemplate = g_objPluginAdmin.ExpandTemplate( strTemplate )
- if( 0 = Len( strExpandedTemplate ) ) then
- if( 0 < Len( strTemplate ) ) then
- err.Raise -1
- err.description = RemoveDangerousCharacters( L_INVALIDLOGPATH_TEXT )
- end if
- end if
- if( 0 = err.number ) then
- bIsValidTemplate = g_objPluginAdmin.IsPathValid( strExpandedTemplate )
- if( bIsValidTemplate ) then
- g_objPluginAdmin.Template = CStr( strTemplate )
- else
- err.Raise -1
- err.description = RemoveDangerousCharacters( L_INVALIDLOGPATH_TEXT )
- end if
- end if
- if ErrorDetected( "template" ) then
- Exit Do
- end if
- end if
-
- Dim dwNewTimeInterval
- Dim dwNewFileSize
- Dim bUseBuffering
- Dim bUseUnicode
- Dim strLogCache
- Dim strEncoding
- strLocCache = RemoveDangerousCharacters( GetFormStr( "logcache" ) )
- strEncoding = RemoveDangerousCharacters( GetFormStr( "encoding" ) )
-
- dwNewTimeInterval = CDbl( GetFormStr( "timeInterval" ) )
- dwNewFileSize = 0
- bUseBuffering = CBool( 0 = StrComp( "buffer", strLocCache, vbTextCompare ) )
- bUseUnicode = CBool( 0 = StrComp( "unicode", strEncoding, vbTextCompare ) )
- dwLoggedEvents = CInt( g_objPluginAdmin.LoggedEvents )
- dwNewLoggedEvents = 0
-
- ' Calc the max file size
- Dim dwFileSize
- dwFileSize = CDbl( RemoveDangerousCharacters( GetFormStr("fileSize") ) )
- if( 0 = Len( dwFileSize ) ) then
- dwFileSize = 0
- end if
- dwNewFileSize = CDbl( dwFileSize )
- if( 0 >= dwNewFileSize ) then
- err.number = -1
- Session( "ErrorDescription" ) = Server.HTMLEncode( L_INVALIDLOGSIZE_TEXT )
- Session( "ErrorNumber" ) = CDbl( Err.Number )
- Session( "ErrorCulprit" ) = "cycle"
- Exit Do
- end if
-
- if( 0 < dwNewFileSize ) then
- if( g_objPluginAdmin.MaxSize <> dwNewFileSize ) and ( 0 < dwNewFileSize ) then
- g_objPluginAdmin.MaxSize = dwNewFileSize
- bCycleTheLogFile = TRUE
- end if
- if 0 <> err.number then
- Session( "ErrorDescription" ) = Server.HTMLEncode( Err.description )
- Session( "ErrorNumber" ) = CInt( Err.Number )
- Session( "ErrorCulprit" ) = "size"
- Exit Do
- end if
- end if
-
- if( g_objPluginAdmin.Cycle <> dwNewTimeInterval ) then
- g_objPluginAdmin.Cycle = dwNewTimeInterval
- bCycleTheLogFile = TRUE
- err.clear
- end if
-
- if ErrorDetected( "cycle" ) then
- Exit Do
- end if
-
- if( 0 <> Len( GetFormStr( "ReqClientLogs") ) ) then
- bRequestClientLogs = TRUE
- end if
- if( 0 <> Len( GetFormStr( "ReqRemClientLogs") ) ) then
- bRequestRemClientLogs = TRUE
- end if
- if( 0 <> Len( GetFormStr( "SavePlayerLog") ) ) then
- bSavePlayerLog = TRUE
- end if
- if( 0 <> Len( GetFormStr( "SaveDistLog") ) ) then
- bSaveDistLog = TRUE
- end if
- if( 0 <> Len( GetFormStr( "UseRole") ) ) then
- bUseRole = TRUE
- end if
-
- if( bRequestClientLogs ) then
- dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_LOCAL
- end if
- if( bRequestRemClientLogs ) then
- dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_REMOTE
- end if
- if( bSavePlayerLog ) then
- dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_PLAYER
- end if
- if( bSaveDistLog ) then
- dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_DISTRIBUTION
- end if
- if( bUseRole ) then
- dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_FILTER_ON_ROLE
- end if
-
- if( dwLoggedEvents <> dwNewLoggedEvents ) then
- g_objPluginAdmin.LoggedEvents = dwNewLoggedEvents
- dwLoggedEvents = dwNewLoggedEvents
- bCycleTheLogFile = TRUE
- end if
-
- if( bUseRole ) then
- g_objPluginAdmin.RoleFilter = RemoveSpecifiedChars( strRole, REGEXP_DANGEROUS_ROLE_CHARS )
- end if
-
- if ErrorDetected( "logOptions" ) then
- Exit Do
- end if
-
- if "utc" = GetFormStr( "timeFormat") then
- if( TRUE = g_objPluginAdmin.UseLocalTime ) then
- g_objPluginAdmin.UseLocalTime = FALSE
- bCycleTheLogFile = TRUE
- end if
- elseif "local" = GetFormStr( "timeFormat") then
- if( FALSE = g_objPluginAdmin.UseLocalTime ) then
- g_objPluginAdmin.UseLocalTime = TRUE
- bCycleTheLogFile = TRUE
- end if
- end if
-
- if( 0 = StrComp( "new", GetFormStr( "logformat" ), vbTextCompare ) ) then
- g_objPluginAdmin.V4Compat = FALSE
- else
- g_objPluginAdmin.V4Compat = TRUE
- end if
-
- if( ErrorDetected( "logformat" ) ) then
- Exit Do
- end if
-
- if( "" <> GetFormStr( "logcache") ) then
- if( bUseBuffering <> g_objPluginAdmin.UseBuffering ) then
- g_objPluginAdmin.UseBuffering = bUseBuffering
- bCycleTheLogFile = TRUE
- end if
- end if
-
- if( 0 < Len( GetFormStr( "encoding" ) ) ) then
- if( bUseUnicode <> g_objPluginAdmin.UseUnicode ) then
- g_objPluginAdmin.UseUnicode = bUseUnicode
- bCycleTheLogFile = TRUE
- end if
- end if
-
- bCycleTheLogFile = TRUE
-
- if( ErrorDetected( "Set" ) ) then
- Exit Do
- end if
-
- Loop Until TRUE
-
- if( bCycleTheLogFile ) then
- g_objPluginAdmin.CycleNow
- end if
-
- if( 0 <> err.number ) then
- Session( "PageReloadedToDisplayError" ) = TRUE
- dwSavedErrNum = err.number
- szSavedErrDesc = err.Description
- else
- if "" <> g_strEncodedPubPointName then
- Response.Redirect "../pubpoints/pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex")
- else
- Response.Redirect "../server_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex")
- end if
- Response.Flush
- Response.End
- end if
- end if
-
- strTemplate = GetFormStr( "LogFileTemplate" )
- strTemplate = strTemplate
- strTemplate = RemoveSpecifiedChars( strTemplate, REGEXP_ILLEGAL_TEMPL_CHARS )
-
- ' read from the plugin, overriding with user changes
- dwLoggedEvents = g_objPluginAdmin.LoggedEvents
-
- if( 0 = Len( strOp ) ) then ' initial load
- if( WMS_LOG_EVENT_LOCAL and dwLoggedEvents ) then
- bRequestClientLogs = TRUE
- end if
-
- if( WMS_LOG_EVENT_REMOTE and dwLoggedEvents ) then
- bRequestRemClientLogs = TRUE
- end if
-
- if( WMS_LOG_EVENT_PLAYER and dwLoggedEvents ) then
- bSavePlayerLog = TRUE
- end if
-
- if( WMS_LOG_EVENT_DISTRIBUTION and dwLoggedEvents ) then
- bSaveDistLog = TRUE
- end if
-
- if( WMS_LOG_EVENT_FILTER_ON_ROLE and dwLoggedEvents ) then
- bUseRole = TRUE
- end if
- else ' cycle or preview path
- if( 0 < Len( GetFormStr( "ReqClientLogs" ) ) ) then
- bRequestClientLogs = TRUE
- end if
-
- if( 0 < Len( GetFormStr( "ReqRemClientLogs" ) ) ) then
- bRequestRemClientLogs = TRUE
- end if
-
- if( 0 < Len( GetFormStr( "SavePlayerLog" ) ) ) then
- bSavePlayerLog = TRUE
- end if
-
- if( 0 < Len( GetFormStr( "SaveDistLog" ) ) ) then
- bSaveDistLog = TRUE
- end if
- end if
-
- if ( 0 < Len( GetFormStr( "expandNow" ) ) ) then
- ' g_objPluginAdmin.CycleNow()
- if Err.number <> 0 then
- end if
- end if
-
-
- WriteHTMLHeader( g_strDecodedServerName )
- %>
- <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
- <% WritePluginJSUtils %>
- <script language="JavaScript">
- <!--
- /*@cc_on @*/
-
- var g_bAlertedUserToInvalidFileSize = false;
- var g_bAlertedUserToInvalidLogPath = false;
-
- ////////////////////////////////////////////////////////////////////
- function ValidateDirectory()
- {
- <% jsTRY %>
- var bEnableOkay = true;
- var szUnfiltered = new String( document.pluginForm.LogFileTemplate.value );
- var szFiltered = "";
-
- // perform left trim
- szUnfiltered = szUnfiltered.replace( /^\s+/, "" );
-
- // perform right trim
- szUnfiltered = szUnfiltered.replace( /\s+$/, "" );
-
- if( 0 == szUnfiltered.length )
- {
- return( false );
- }
-
- if( bEnableOkay )
- {
- szFiltered = szUnfiltered.replace( /\`|\'|!|@|#|\^|\&|\||{|}|;|\?|\"/g, "" );
- if( szUnfiltered != szFiltered )
- {
- bEnableOkay = false;
- }
- }
-
- if( bEnableOkay )
- {
- document.pluginForm.LogFileTemplate.style.color = "#000000";
- return( true );
- }
- else
- {
- document.pluginForm.LogFileTemplate.style.color = "#ff0000";
- if( ( 0 < szUnfiltered.length ) && ! g_bAlertedUserToInvalidLogPath )
- {
- g_bAlertedUserToInvalidLogPath = true;
- window.alert( "<%= Server.HTMLEncode( L_INVALIDLOGPATH_TEXT ) %>" );
- }
- return( false );
- }
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function DoExpandNow()
- {
- <% jsTRY %>
- var bFired;
- document.pluginForm.expanded.value="TRUE";
- document.pluginForm.formHistory.value="expand";
- <% if brMSIE = g_dwBrowserType then %>
- bFired = document.pluginForm.ok.fireEvent( "onclick" );
- <% else %>
- // document.pluginForm.ok.click();
- <% end if %>
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function DoApply( caller )
- {
- <% jsTRY %>
- var bFired;
- document.pluginForm.formHistory.value="apply";
- // bFired = document.pluginForm.ok.fireEvent( "onclick" );
- // document.pluginForm.submit();
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function DoCycleNow( caller )
- {
- <% jsTRY %>
- var bFired;
- document.pluginForm.formHistory.value="cycle";
- <% if brMSIE = g_dwBrowserType then %>
- bFired = document.pluginForm.ok.fireEvent( "onclick" );
- <% else %>
- // document.pluginForm.ok.click();
- <% end if %>
- // document.pluginForm.submit();
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function ResetForm()
- {
- <% jsTRY %>
- document.pluginForm.formHistory.value="";
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function ToggleFileSizeRadioButtons( dwWhichButton )
- {
- <% jsTRY %>
- if( 4 != dwWhichButton )
- {
- return;
- }
-
- document.pluginForm.timeInterval[0].checked = ( 0 == dwWhichButton ) ? true : false;
- document.pluginForm.timeInterval[1].checked = ( 1 == dwWhichButton ) ? true : false;
- document.pluginForm.timeInterval[2].checked = ( 2 == dwWhichButton ) ? true : false;
- document.pluginForm.timeInterval[3].checked = ( 3 == dwWhichButton ) ? true : false;
- document.pluginForm.timeInterval[4].checked = ( 4 == dwWhichButton ) ? true : false;
- document.pluginForm.timeInterval[5].checked = ( 5 == dwWhichButton ) ? true : false;
-
- // document.pluginForm.fileSize.disabled = ! document.pluginForm.timeInterval[4].checked;
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function CheckOptions()
- {
- <% jsTRY %>
- var bEnableSaveOptions = true;
- bEnableSaveOptions = document.pluginForm.ReqClientLogs.checked || document.pluginForm.ReqRemClientLogs.checked;
-
- document.pluginForm.SavePlayerLog.disabled = ! bEnableSaveOptions;
- document.pluginForm.SaveDistLog.disabled = ! bEnableSaveOptions;
-
- UpdatePlayerStatsCheckboxes();
- <% jsCATCH %>
- }
-
-
- ////////////////////////////////////////////////////////////////////
- function WarnIfNothingToBeLogged()
- {
- <% jsTRY %>
- var bWarn = true;
- bWarn = ( ! document.pluginForm.ReqClientLogs.checked ) && ( ! document.pluginForm.ReqRemClientLogs.checked );
-
- if( bWarn )
- {
- window.alert( "<%= RemoveDangerousCharacters( L_LOGNOTHINGWARN_TEXT ) %>" );
- }
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function CheckRole()
- {
- <% jsTRY %>
- if( ( false == document.pluginForm.UseRole.checked ) || document.pluginForm.role.disabled )
- {
- return( true );
- }
-
- document.pluginForm.role.disabled = false;
-
- var szRole = document.pluginForm.role.value;
- var dwLenRole = szRole.length;
- szRole = szRole.replace( /\<|\>|\;|\(|\)|\&/g, "" );
-
- if( dwLenRole != szRole.length )
- {
- document.pluginForm.ok.disabled = true;
- document.pluginForm.role.style.color="#FF0000";
- return( false );
- document.pluginForm.role.value = szRole;
- }
- else
- {
- document.pluginForm.role.style.color="#000000";
- }
-
- // szRole = szRole.replace( /(\s)+/g, "" );
- return( szRole.length > 0 );
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function CheckFileSize()
- {
- <% jsTRY %>
- if( ! document.pluginForm.timeInterval[4].checked )
- {
- return( true );
- }
-
- document.pluginForm.fileSize.disabled = false;
- var bValidInput = true;
- var bDisableOKButtons = false;
-
- var szFileSize = document.pluginForm.fileSize.value;
- if( 0 == szFileSize.length )
- {
- return( false );
- }
-
- if( isNaN( szFileSize ) )
- {
- bDisableOKButtons = true;
- bValidInput = ! ( 0 < szFileSize.length );
- }
- else
- {
- dwFileSize = parseInt( szFileSize );
- if( 0 >= dwFileSize )
- {
- bValidInput = false;
- bDisableOKButtons = ( 0 == dwFileSize );
- }
- }
-
- if( ! bValidInput )
- {
- document.pluginForm.fileSize.style.color="#ff0000";
- if( 0 < szFileSize.length && ( ! g_bAlertedUserToInvalidFileSize ) )
- {
- g_bAlertedUserToInvalidFileSize = true;
- window.alert( "<%= RemoveDangerousCharacters( L_INVALIDLOGSIZE_TEXT ) %>" );
- }
- else
- {
- window.status = "<%= RemoveDangerousCharacters( L_INVALIDLOGSIZE_TEXT ) %>";
- }
- }
- else
- {
- window.status = "";
- document.pluginForm.fileSize.style.color="#000000";
- }
-
- bValidInput = bValidInput && ( ! bDisableOKButtons );
- return( bValidInput );
-
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function UpdateButtonStates()
- {
- <% jsTRY %>
- var bAggregateInputIsOkay = false;
-
- bAggregateInputIsOkay = ValidateDirectory();
- bAggregateInputIsOkay = CheckFileSize() && bAggregateInputIsOkay;
- bAggregateInputIsOkay = CheckRole() && bAggregateInputIsOkay;
-
- document.pluginForm.ok.disabled = ! bAggregateInputIsOkay;
- document.pluginForm.expand.disabled = ! bAggregateInputIsOkay;
- document.pluginForm.cycle.disabled = ! bAggregateInputIsOkay;
- <% jsCATCH %>
- }
-
- ////////////////////////////////////////////////////////////////////
- function UpdatePlayerStatsCheckboxes()
- {
- <% jsTRY %>
- var bPlayerStatsChecked
- var bUseRoleChecked
-
- bUseRoleChecked = false;
-
- bPlayerStatsChecked = document.pluginForm.SavePlayerLog.checked;
- if( true == bPlayerStatsChecked )
- {
- bUseRoleChecked = document.pluginForm.UseRole.checked;
- }
-
- document.pluginForm.UseRole.disabled = ! bPlayerStatsChecked;
- document.pluginForm.role.disabled = ! bUseRoleChecked;
- <% jsCATCH %>
- }
- -->
- </script>
- </head>
- <body class="pluginBody" onLoad="JavaScript:ResetForm();CheckOptions();UpdateButtonStates();" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" width="90%" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
- <% DrawPluginBanner %>
- <!--
- <table border=0>
- <tr><td width=50% valign=top>
- -->
- <table border=0>
- <tr>
- <td valign=top>
- <% WriteStdPluginForm %>
- <input
- type="hidden"
- name="formHistory"
- id="formHistory"
- value="<%= RemoveDangerousCharacters( GetFormStr( "formHistory" ) ) %>" >
- <input
- type="hidden"
- name="expanded"
- id="expanded"
- value="<%= RemoveDangerousCharacters( GetFormStr( "expanded" ) ) %>" >
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_DIRECTORY_TEXT ), "template" %></caption>
- <tr>
- <td>
- <br>
- <div class="defaultcursor" ><%= Server.HTMLEncode( L_LOGGINGHELP_TEXT ) %></div><br>
- </tr>
- <tr>
- <td>
- <input
- type="text"
- name="LogFileTemplate"
- value="<%
- if( 0 = Len( strTemplate ) ) then
- strTemplate = RemoveSpecifiedChars( GetFormStr( "LogFileTemplate" ), REGEXP_ILLEGAL_TEMPL_CHARS )
- if 0 = Len( strTemplate ) then
- strTemplate = RemoveSpecifiedChars( g_objPluginAdmin.Template, REGEXP_ILLEGAL_TEMPL_CHARS )
- end if
- end if
- Response.Write( Server.HTMLEncode( strTemplate ) )
- %>"
- size="70"
- maxlength="<%= Server.HTMLEncode( MAX_PATH ) %>"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- onChange="JavaScript:UpdateButtonStates();"
- onKeyDown="JavaScript:UpdateButtonStates();"
- onKeyUp="JavaScript:UpdateButtonStates();"
- onPaste="JavaScript:UpdateButtonStates();"
- >
- <input
- type="submit"
- hidefocus="true"
- name="expand"
- id="expand"
- value="<%= Server.HTMLEncode( L_VERIFYPATHBUTTON_TEXT ) %>"
- size="30"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- onClick="JavaScript:DoExpandNow();" >
- <%
- if( ( 0 = StrComp( "TRUE", GetFormStr( "expanded" ) ) ) or ( 0 < Len( GetFormStr( "expand" ) ) ) ) then %>
- <div class="defaultcursor" >
- <br>
- <kbd>
- <%
- on error resume next
- strExpandedTemplate = g_objPluginAdmin.ExpandTemplate( strTemplate )
- if( 0 = Len( strExpandedTemplate ) ) then
- if( 0 < Len( strTemplate ) ) then
- strExpandedTemplate = err.Description
- end if
- end if
- Response.Write( Server.HTMLEncode( strExpandedTemplate ) )
- ' strExpandedTemplate = nothing
- %>
- </kbd>
- <br>
- </div><%
- end if
- %>
- </td>
- </tr>
- </table>
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox" cellspacing="0" cellpadding=0>
- <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGCYCLE_TEXT ), "cycle" %></caption>
- <tr>
- <td colspan=2>
- <br>
- <div class="defaultcursor" ><%= Server.HTMLEncode( L_LOGCYCLEHELP_TEXT ) %></div>
- <br>
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="radio"
- name="timeInterval"
- value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_HOUR ) %>"
- ID="time_hour"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "5", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- 5 = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:ToggleFileSizeRadioButtons( 0 );"
- > <label for="time_hour" class="handcursor"><%= Server.HTMLEncode( L_HOURLY_TEXT ) %></label>
- </td>
- <td align="right">
-
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="radio"
- name="timeInterval"
- value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_DAY ) %>"
- ID="time_day"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "4", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- 4 = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:ToggleFileSizeRadioButtons( 1 );"
- > <label for="time_day" class="handcursor"><%= Server.HTMLEncode( L_DAILY_TEXT ) %></label>
- </td>
- <td align="right">
-
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="radio"
- name="timeInterval"
- value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_WEEK ) %>"
- ID="time_week"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "3", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- 3 = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:ToggleFileSizeRadioButtons( 2 );"
- > <label for="time_week" class="handcursor"><%= Server.HTMLEncode( L_WEEKLY_TEXT ) %></label>
- </td>
- <td align="right">
-
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="radio"
- name="timeInterval"
- value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_MONTH ) %>"
- ID="time_month"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "2", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- 2 = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:ToggleFileSizeRadioButtons( 3 );"
- > <label for="time_month" class="handcursor"><%= Server.HTMLEncode( L_MONTHLY_TEXT ) %></label>
- </td>
- <td align="right">
-
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="radio"
- name="timeInterval"
- id="time_size"
- onChange="JavaScript:UpdateButtonStates();"
- onPaste="JavaScript:UpdateButtonStates();"
- onKeyDown="JavaScript:UpdateButtonStates();"
- onKeyUp="JavaScript:UpdateButtonStates();"
- value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_SIZE ) %>"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "1", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif WMS_LOG_CYCLE_SIZE = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:document.pluginForm.fileSize.disabled = false;ToggleFileSizeRadioButtons( 4 );"
- > <label for="time_size" class="handcursor"><% RenderWithErrorCheck Server.HTMLEncode( L_WHENFILESIZEREACHES_TEXT ), "size" %></label>
- <input
- type="text"
- name="fileSize"
- value="<%
- if( 0 = Len( GetFormStr("fileSize") ) )then
- Response.Write( RemoveDangerousCharacters( g_objPluginAdmin.MaxSize ) )
- else
- Response.Write( Server.HTMLEncode( GetFormStr( "fileSize" ) ) )
- end if %>"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- size="4"
- onKeyUp="JavaScript:UpdateButtonStates();"
- onKeyDown="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
- onChange="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
- onPaste="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
- maxlength="6">
- </span>
- </td>
- <td align="right">
-
- </td>
- </tr>
- <tr>
- <td>
- <input type="radio" name="timeInterval" value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_NONE ) %>" id="time_never" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
- if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
- if( 0 = StrComp( "0", GetFormStr("timeInterval"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- 0 = g_objPluginAdmin.Cycle then
- Response.Write(" checked ")
- end if
- %>
- onFocus="JavaScript:ToggleFileSizeRadioButtons( 5 );"
- > <label for="time_never" class="handcursor"><%= Server.HTMLEncode( L_NEVER_TEXT ) %></label>
- </td>
- <td>
-
- </td>
-
- </tr>
- </table><br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGGINGINFO_TEXT ) %></caption>
- <tr>
- <td>
- <br>
- <div class="helptext" ><%= Server.HTMLEncode( L_CYCLENOWHELP_TEXT ) %></div><br>
- <input type="submit"
- hidefocus="true"
- name="cycle"
- value="<%= Server.HTMLEncode( L_CYCLENOWBUTTON_TEXT ) %>"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- onClick="JavaScript:DoCycleNow( this );">
- </td>
- </tr>
- </table>
- <!--
- </td>
- </tr>
- -->
- <!-- </table>
- -->
- <!--
- </td>
- <td width=50% valign=top>
- -->
- <!------------------------------------------------------------------------------------------
- Advanced
- ------------------------------------------------------------------------------------------>
- <!-- <table cellspacing="0" border="0" width="90%">
- -->
- <!--
- <tr>
- <td valign=top>
- -->
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_TIMEFORMAT_TEXT ) %></caption>
- <tr><td>
- <input type="radio"
- name="timeFormat"
- value="utc"
- id="timeFormat_utc"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 = StrComp( "utc", GetFormStr("timeFormat" ), vbTextCompare ) ) then
- Response.Write( " checked " )
- elseif ( 0 <> StrComp( "local", GetFormStr("timeformat"), vbTextCompare ) ) and ( not g_objPluginAdmin.UseLocalTime ) then
- Response.Write( " checked " )
- end if
- %> >
- <label for="timeFormat_utc" class="handcursor"><%= Server.HTMLEncode( L_USEUTC_TEXT ) %></label><br>
- <input type="radio"
- name="timeFormat"
- value="local"
- id="timeFormat_local"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 = StrComp( "local", GetFormStr("timeFormat" ), vbTextCompare ) ) then
- Response.Write( " checked " )
- elseif ( 0 <> StrComp( "utc", GetFormStr("timeformat"), vbTextCompare ) ) and ( g_objPluginAdmin.UseLocalTime ) then
- Response.Write( " checked " )
- end if
- %> >
- <label for="timeFormat_local" class="handcursor"><%= Server.HTMLEncode( L_USELOCALTIME_TEXT ) %></label><br>
- </td></tr></table>
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGCACHE_TEXT ) %></caption>
- <tr><td>
- <input type="radio"
- name="logcache"
- value="buffer"
- id="logcache_buffer"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 < Len( GetFormStr("logCache" ) ) ) then
- if( 0 = StrComp( "buffer", GetFormStr("logCache"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- True = g_objPluginAdmin.UseBuffering then
- Response.Write(" checked ")
- end if
- %> >
- <label for="logcache_buffer" class="handcursor"><%= Server.HTMLEncode( L_BUFFERLOGENTRIES_TEXT ) %></label><br>
-
- <input type="radio"
- name="logcache"
- value="writenow"
- id="logcache_writenow"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 < Len( GetFormStr("logCache" ) ) ) then
- if( 0 = StrComp( "writenow", GetFormStr("logCache"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- False = g_objPluginAdmin.UseBuffering then
- Response.Write(" checked ")
- end if
- %> >
- <label for="logcache_writenow" class="handcursor"><%= Server.HTMLEncode( L_WRITELOGENTRIESIMMEDIATELY_TEXT ) %></label><br>
- </td></tr></table>
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_TEXTENCODING_TEXT ) %></caption>
- <tr><td>
- <input type="radio"
- name="encoding"
- value="unicode"
- id="encoding_unicode"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 < Len( GetFormStr("encoding" ) ) ) then
- if( 0 = StrComp( "unicode", GetFormStr("encoding"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- True = g_objPluginAdmin.UseUnicode then
- Response.Write(" checked ")
- end if
- %> >
- <label for="encoding_unicode" class="handcursor"><%= Server.HTMLEncode( L_USEUNICODECHARS_TEXT ) %></label><br>
- <input type="radio"
- name="encoding"
- value="ansi"
- id="encoding_ansi"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( 0 < Len( GetFormStr("encoding" ) ) ) then
- if( 0 = StrComp( "ansi", GetFormStr("encoding"), vbTextCompare ) ) then
- Response.Write( " checked " )
- end if
- elseif _
- False = g_objPluginAdmin.UseUnicode then
- Response.Write(" checked ")
- end if
- %> >
- <label for="encoding_ansi" class="handcursor"><%= Server.HTMLEncode( L_USEANSICHARS_TEXT )%></label><br>
- </td></tr></table>
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGFORMAT_TEXT ), "logformat" %></caption>
- <tr><td>
- <input type="radio"
- name="logformat"
- value="new"
- id="logformat_new"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- Dim strLogFormat
- Dim bCheckedNew
- bCheckedNew = FALSE
- strLogFormat = GetFormStr("logformat" )
- if( 0 < Len( strLogFormat ) ) then
- if( 0 = StrComp( "new", strLogFormat, vbTextCompare ) ) then
- Response.Write( " checked " )
- bCheckedNew = TRUE
- end if
- elseif( FALSE = g_objPluginAdmin.V4Compat ) then
- Response.Write(" checked ")
- bCheckedNew = TRUE
- end if
- %> >
- <label for="logformat_new" class="handcursor"><%= Server.HTMLEncode( L_WMSFORMATLOG_TEXT ) %></label><br>
-
- <input type="radio"
- name="logformat"
- value="old"
- id="logformat_old"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if( FALSE = bCheckedNew ) then
- Response.Write( " checked " )
- end if
- %> >
- <label for="logformat_old" class="handcursor"><%= Server.HTMLEncode( L_LEGACYFORMATLOG_TEXT ) %></label><br>
- <span class="defaultcursor"> <table cellspacing=1 cellpadding=1 border=0><tr><td><img src="img/wmstip_32.gif" height="32" width="32"></td><td><%= L_RPTANALYSISTOOL_TEXT %></td></tr></table></span><br>
- </td></tr></table>
- <br>
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGOPTIONS_TEXT ) %></caption>
- <tr><td>
- <br>
- <div class="helptext"><%= Server.HTMLEncode( L_LOGREQHEADER_TEXT ) %></div><br>
- <input type="checkbox"
- name="ReqClientLogs"
- onClick="JavaScript:CheckOptions();WarnIfNothingToBeLogged();"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if bRequestClientLogs then
- Response.Write(" checked ")
- end if
- %> >
- <span class="handcursor" onClick="JavaScript:document.pluginForm.ReqClientLogs.checked = !document.pluginForm.ReqClientLogs.checked;CheckOptions();WarnIfNothingToBeLogged();"><%= L_LOGREQCLIENTLOGS_TEXT %></span><br>
-
- <input type="checkbox"
- name="ReqRemClientLogs"
- onClick="JavaScript:CheckOptions();WarnIfNothingToBeLogged();"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if bRequestRemClientLogs then
- Response.Write(" checked ")
- end if
- %> >
- <span class="handcursor" onClick="JavaScript:document.pluginForm.ReqRemClientLogs.checked = !document.pluginForm.ReqRemClientLogs.checked;CheckOptions();WarnIfNothingToBeLogged();"><%= L_LOGCLIENTREMOTE_TEXT %></span><br>
- </td>
- </tr>
- </table>
-
- <table cellspacing="0" border="0" width="100%" class="propgroupbox">
- <tr>
- <td>
- <br>
- <div class="helptext"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGFILTOPTIONS_TEXT ), "logOptions" %></div><br>
-
- <input type="checkbox"
- name="SavePlayerLog"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- onClick="JavaScript:UpdatePlayerStatsCheckboxes();"
- <%
- if bSavePlayerLog then
- Response.Write(" checked ")
- end if
- %> >
- <span class="handcursor" onClick="JavaScript:document.pluginForm.SavePlayerLog.checked = !document.pluginForm.SavePlayerLog.checked;UpdatePlayerStatsCheckboxes();"><%= L_LOGPLAYER_TEXT %></span><br>
-
- <table cellpadding=2 cellspacing="0" border="0">
- <tr>
- <td>
-
- </td>
- <td>
- <input type="checkbox"
- name="UseRole"
- id="UseRoleCheckbox"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- onClick="JavaScript:UpdatePlayerStatsCheckboxes();UpdateButtonStates();"
- onChange="JavaScript:UpdatePlayerStatsCheckboxes();UpdateButtonStates();"
- <%
- if( bUseRole or ( 0 <> Len( GetFormStr( "UseRole" ) ) ) ) then
- Response.Write(" checked ")
- end if
- %> >
- <label for="UseRoleCheckbox" class="handcursor"><%= Server.HTMLEncode( L_LOGSTATSWROLE_TEXT ) %></label><br>
- </td>
- </tr>
- <tr>
- <td>
-
- </td>
- <td>
- <input type="text" name="role" value="<%
- Response.Write( RemoveSpecifiedChars( strRole, REGEXP_DANGEROUS_ROLE_CHARS ) )
- %>" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <% if brMSIE <> g_dwBrowserType then %>
- size="25"
- <% else %>
- size="40"
- <% end if %>
- maxlength="<%= Server.HTMLEncode( MAX_PATH ) %>"
- onChange="JavaScript:UpdateButtonStates();"
- onKeyDown="JavaScript:UpdateButtonStates();"
- onKeyUp="JavaScript:UpdateButtonStates();"
- onPaste="JavaScript:UpdateButtonStates();"
- >
- </td>
- </tr>
- </table>
-
- <input type="checkbox"
- name="SaveDistLog"
- tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
- <%
- if bSaveDistLog then
- Response.Write(" checked ")
- end if
- %> >
- <span class="handcursor" onClick="JavaScript:document.pluginForm.SaveDistLog.checked = !document.pluginForm.SaveDistLog.checked;"><%= Server.HTMLEncode( L_LOGDIST_TEXT ) %></span><br>
- </td></tr></table>
-
- <!--
- </td>
- </tr>
- </table>
- -->
- </td></tr>
- <tr>
- <td colspan=2>
- <br>
- <input type="submit" align="baseline" name="ok" value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> onClick="JavaScript:ResetForm();DoApply();">
- <input type="button" align="baseline" name="cancel" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" onclick="JavaScript:Cancel();" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>>
- <input type="button" align="baseline" name="help" onclick="JavaScript:DoPluginHelp( '<%= H_LOGGINGHELPTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id=help tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>>
- </td>
- </tr>
- </table>
- </form>
- <%
- AlertUserWithPopupErrorDialog
- if( 0 >= Len( GetFormStr( "formHistory" ) ) ) then
- OnErrorGoBack
- end if
- %>
- </body>
- </html>
- <%
- LatchCurrentPage "plugins/LoggingAdmin.asp", qs
- EndErrorHandling "LoggingAdmin.asp"
-
- on error resume next
- PluginsASPCleanup
- %>